The present invention relates to a hinge and an electronic device with the hinge, especially to the hinge that is mounted between the cover and the base of the electronic device and has a shaft which slides while the cover is pivoted.